<div id="tabs">
    <ul>
        <li><a href="/usermanagement/profile/generaldataform"><span>General Info</span></a></li>
        <li><a href="/usermanagement/profile/passwordform"><span>Password</span></a></li>
    </ul>
</div>



{literal}
<script type="text/javascript">
$(document).ready(function(){
	$("#tabs").tabs({	
		ajaxOptions:{dataType:'json',success: pasteContentToTab},
		select: function(event,ui){removeMessages();}
	});
});


function pasteContentToTab(json){
	var tabs = $('#tabs').tabs();
	var selected = tabs.tabs('option','selected');
	var div = $('div[id^='+tabs.tabs('option','idPrefix')+']:eq('+selected+')');
	div.html(json.content);
}
</script>
{/literal}
